<template>
  <components
    :is="currentComponent"
    class="data-v-menu"
    :color="color"
    :activeColor="activeColor"
    :menuList="menuList"
  ></components>
</template>

<script>
import menu1 from "./menu1.vue";
import menu2 from "./menu2.vue";
import menu3 from "./menu3.vue";

export default {
  name: "data-v-menu",
  props: {
    type: {
      type: [Number, String],
      default: 1
    },
    color: {
      type: String,
      default: "#fff"
    },
    activeColor: {
      type: String,
      default: "#f30"
    },
    menuList: {
      type: Array,
      default: function() {
        return [];
      }
    }
  },
  components: {
    menu1,
    menu2,
    menu3
  },
  computed: {
    currentComponent() {
      return "menu" + this.type;
    }
  }
};
</script>
<style lang="less">
.data-v-menu {
}
</style>
